#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <set>
#include <queue>

using namespace std;
using LL = long long;
using PII = pair<int, int>;

const LL inf = 1e18;


LL n, m, q, u, v, t;
deque<LL> A, B, C;
vector<LL> nums;

LL f(LL x){
    LL t = x * u / v;
    return t;
}

LL get_key(LL x, LL t){
    LL ans = x - t * q;
    return ans;
}

LL get_len(LL x, LL t){
    LL ans = x + t * q;
    return ans;
}


void getall(){

    vector<LL> nums;
    if(!A.empty()) for(int i = 0; i < A.size(); i ++) nums.push_back(get_len(A[i], m));
    if(!B.empty()) for(int i = 0; i < B.size(); i ++) nums.push_back(get_len(B[i], m));
    if(!C.empty()) for(int i = 0; i < C.size(); i ++) nums.push_back(get_len(C[i], m));
    

    sort(nums.begin(), nums.end(), [&](LL a, LL b) -> bool{return a > b; });
    for(int i = 0; i < nums.size(); i ++) {
        if((i + 1) % t == 0) cout << nums[i] << " ";
    }
    cout << '\n';
}

int main(){
#ifdef LOCALFLAG
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif


    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n >> m >> q >> u >> v >> t;
    for(int i = 1; i <= n; i ++) {
        LL k;
        cin >> k;
        nums.push_back(k);
    }

    sort(nums.begin(), nums.end());
    for(int i = 0; i < nums.size(); i ++){
        A.push_front(nums[i]);
    }

    for(int i = 1; i <= m; i ++){
        LL k1 = -inf, k2 = -inf, k3 = -inf;
        if(!A.empty()) k1 = A.front();
        if(!B.empty()) k2 = B.front();
        if(!C.empty()) k3 = C.front();
    
        LL maxv = max(k1, max(k2, k3));

        if(maxv == k1){
            A.pop_front();
            LL nlen = get_len(maxv, i - 1);

            
            if(i % t == 0) cout << nlen << " ";
            LL len1 = f(nlen);
            LL len2 = nlen - len1;

            B.push_back(get_key(len1, i));
            C.push_back(get_key(len2, i));
        }else if(maxv == k2){
            B.pop_front();
            LL nlen = get_len(maxv, i - 1);
            
    
            if(i % t == 0) cout << nlen << " ";
            LL len1 = f(nlen);
            LL len2 = nlen - len1;

            B.push_back(get_key(len1, i));
            C.push_back(get_key(len2, i));
        }else{
            C.pop_front();

            LL nlen = get_len(maxv, i - 1);
            if(i % t == 0) cout << nlen << " ";
            LL len1 = f(nlen);
            LL len2 = nlen - len1;

            B.push_back(get_key(len1, i));
            C.push_back(get_key(len2, i));
        }


        
    }
    cout << '\n';
    getall();

    return 0;
}